<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Exercises</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch13lev1sec8.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch14.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch13lev1sec9"></a>
<h3 class="docSection1Title" id="454331-910">Exercises</h3>
<P><table border="0" cellspacing="16" cellpadding="0"><TR valign="top"><td align="right" class="docText" width="50"><a name="ch13qa1q1"></a><B><a class="docLink" href="app03lev1sec13.html#ch13qa1q1a1">13.1</a></b></TD><TD><p class="docText">As we might guess from <a class="docLink" href="ch13lev1sec4.html#ch13fig02">Figure 13.2</a>, when the <tt>syslog</tt> facility is initialized, either by calling <tt>openlog</tt> directly or on the first call to <tt>syslog</tt>, the special device file for the UNIX domain datagram socket, <tt>/dev/log</tt>, has to be opened. What happens if the user process (the daemon) calls <tt>chroot</tt> before calling <tt>openlog</tt>?</p>
</TD></TR><TR valign="top"><td align="right" class="docText" width="50"><a name="ch13qa1q2"></a><B>13.2</b></td><TD><p class="docText">List all the daemons active on your system, and identify the function of each one.</P>
</TD></tr><TR valign="top"><TD align="right" class="docText" width="50"><a name="ch13qa1q3"></a><b><a class="docLink" href="app03lev1sec13.html#ch13qa1q3a3">13.3</a></b></TD><TD><p class="docText">Write a program that calls the <tt>daemonize</tt> function in <a class="docLink" href="ch13lev1sec3.html#ch13fig01">Figure 13.1</a>. After calling this function, call <tt>getlogin</tt> (<a class="docLink" href="ch08lev1sec15.html#ch08lev1sec15">Section 8.15</a>) to see whether the process has a login name now that it has become a daemon. Print the results to a file.</p>
</td></tr></table></p>

<UL></ul></TD></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch13lev1sec8.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch14.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--46-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--46-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
